package com.example.homework7;

import androidx.room.Dao;
import androidx.room.Insert;
import androidx.room.Query;

import java.util.List;

@Dao
public interface UserDao {
    @Insert
    void insert(User user);

    @Query("SELECT * FROM users")
    List<User>  getAll();

    @Query("SELECT * FROM users WHERE age<:age")
    List<User> searchUsersByAge(int age);
}
